package com.kaifamiao.N0727;

public class Student {

    private String name;

    private int age;

    public Student(){

    }


    public String getName(){
        return this.name;
    }

    public void setName(String name) {
        if("陈浩南".equals(name)){
            System.out.println("你是铜锣湾的扛把子吗？");
        }else{
            this.name = name;
        }
    }

    public int getAge(int age) {
        return this.age;
    }

    public void setAge(int age){
        if(age<1||age>120){
            System.out.println("你是外星人吧！");
        }else{
            this.age = age;
        }
    }
}
